package protocol.arq;
import protocol.arq.gobackN.GoBackNSender;
import protocol.hdlc.TrameBuilder;
import test.Test;
import utils.advancedSocket.AdvancedSocket;

/**
 * Represente la methode <i>Automatic Repeat reQuest</i> de controle d'erreur
 * pour la tranmission de donnees lors de l'envoie.
 * 
 * @see GoBackNSender
 * @see ARQReceiver
 * @author Bertholet Damien & Daoust Julien
 */
public abstract class ARQSender extends ARQ {

	protected TrameBuilder trameBuilder;

	/**
	 * Constructeur.
	 * 
	 * @param advancedSocket
	 *            L'{@link AdvancedSocket}.
	 * @param trameBuilder
	 *            La {@link TrameBuilder} pour avoir les prochaines donnees.
	 */
	public ARQSender(AdvancedSocket advancedSocket, TrameBuilder trameBuilder) {
		super(advancedSocket);
		this.trameBuilder = trameBuilder;
		Test.SENDER_ERROR = true;
	}

	/**
	 * Lance la connexion.
	 */
	public abstract void startConnection();
}